<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix='c' uri='http://java.sun.com/jsp/jstl/core'%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /><!-- 控制浏览器文件模式为IE8 -->
<title>功能項管理</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="js/artDialog/skins/default.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/elegant/om-all.css" />

<script src="js/artDialog/artDialog.js?skin=blue"></script>
<script src="js/artDialog/plugins/iframeTools.js"></script>
<script src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/operamasks-ui.min.js"></script>
<script language="javascript">
	var j = jQuery.noConflict();
	j.ajaxSetup({
		cache:false,
		async: false
	});
</script>
<script type="text/javascript">
	(function (config) {
	    config['lock'] = true;
	    config['fixed'] = true;
	    config['okVal'] = 'Ok';
	    config['cancelVal'] = 'Cancel';	  
	})(art.dialog.defaults);
	 j.omMessageBox.waiting({
         title:'請稍後',
         content:'服務器正在處理您的請求，請稍後...',
     });

	function search() {
		j("#searchKey").val("search");
		var flag=true;
		if(flag)
		{
			j.omMessageBox.waiting({
		         title:'請稍後',
		         content:'服務器正在處理您的請求，請稍後...',
		     });
			document.forms[0].submit();
		}		
	}
	
	function reset()
	{
		j("#functionName").val("");
		j("#functionCode").val("");
	}
	
</script>
</head>
<body>
	<div class="rightinfo">
		<form id="form1" action="./adminFunction.do?action=allList" method="post">

			<ul class="seachform">
				<li>
					<label>功能項名稱：</label>
					<input name="functionName" id="functionName" value="${functionName}" type="text" class="scinput" autocomplete="off"/>
				</li>
				<li>
					<label>功能項編碼：</label>
					<input name="functionCode" id="functionCode" value="${functionCode}" type="text" class="scinput" autocomplete="off"/>
				</li>
				<li><label>&nbsp;</label><input type="button" onclick="search()" class="scbtn" value="查詢" /></li>
			</ul>

			<table class="tablelist">
				<thead>
					<tr>
						<th></th>
						<th>序號</th>
						<th>功能項名稱</th>
			            <th>功能項編碼</th>
			            <th>上一級功能項</th>
			            <th>功能項路徑</th>
			            <th>描述</th>                 
			            <th>創建日期</th>
					</tr>
				</thead>
				<tbody>
					<c:set var="i" value="${(paginationSupport.curPage-1)*(paginationSupport.countPerPage)}" /> 
				<c:forEach var="list" items="${paginationSupport.resultList}">
					<c:set var="i" value="${i+1}" />
						<tr>
							<td><input type="radio" name="radio" id="${list.functionId}" value="名稱：${list.functionName } —— 編碼：${list.functionCode }"/></td>
							<td>${i}</td>
							<td>${list.functionName}</td>
				            <td>${list.functionCode}</td>
				            <td>${list.parentName}</td>
				            <td>${list.functionUrl}</td>
				            <td>${list.description}</td>
				            <td><fmt:formatDate value="${list.createdTime}" type="both" pattern="yyyy-MM-dd HH:mm:ss"/></td>  
							<td>
								
							</td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
			<div class="pagin" style="float: right; padding-right: 80px;">
				<c:import url="pagination.jsp"></c:import>
			</div>
		</form>
	</div>
	<script type="text/javascript">
		$('.tablelist tbody tr:odd').addClass('odd');
	</script>
</body>
</html>